<?php

/**
 * @BelongProject: flami_mangers
 * @Author: Zwc
 * @CreateTime: 2025-11-10 21:33:26
 * @Description: TODO
 */

namespace App\Domain;

use function PhalApi\DI;

class OptionDomain
{
    /**
     * 获取系统配置参数
     * @return array
     */
    public static function getOptions()
    {
        $where = 'option_name IN (\'site_info\',\'configpri\')';
        $dataList = DI()->notorm->option->where($where)
            ->fetchAll();
        $resData = [];

        foreach ($dataList as $val) {
            $resData[$val['option_name']] = json_decode($val['option_value']);
        }
        return $resData;
    }


}